<template>
  <div class="navbar">
    <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">

      <!--        可折叠式设计-->
      <el-radio-button  :label="false">展开</el-radio-button>
      <el-radio-button  :label="true">收起</el-radio-button>
    </el-radio-group>
    <el-menu default-active="1-4-1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :collapse="isCollapse">

      <!--        课程管理栏-->
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span slot="title">课程管理</span>
        </template>

        <el-menu-item-group>
          <el-menu-item route="{name:'Test1'}" index="1-1">成绩查询</el-menu-item>
          <el-menu-item index="1-2">课程信息查询</el-menu-item>
          <el-menu-item index="1-3">评教系统</el-menu-item>
        </el-menu-item-group>
      </el-submenu>

      <!--        课表管理栏-->
      <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-document"></i>
          <span slot="title">请销假</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="2-1">请假管理</el-menu-item>
          <el-menu-item index="2-2">销假管理</el-menu-item>
        </el-menu-item-group>
      </el-submenu>

      <!--        个人信息管理栏-->
      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-setting"></i>
          <span slot="title">个人信息</span>
        </template>

        <el-menu-item-group>
          <el-menu-item index="3-1">密码修改</el-menu-item>
          <el-menu-item index="3-2">个人信息修改</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
    </el-menu>
  </div>


</template>


<script>

  export default {
    name: 'AdminMain',
    data() {
      return {
        isCol: true,
        isCollapse: true,

      }
    },
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClick(row) {
        console.log(row);
      }
    }
  }
</script>


<style>
  .search-query {
    width:450px;
    height: 30px;
    line-height: 30px;
    box-sizing: border-box;
    padding: 0 15px 0 30px;
    border: 2px solid #e3e3e3;
    color: #273849;
    outline: none;
    border-radius: 15px;
    margin-right: 10px;
    transition: border-color 0.2s ease;
    background: #fff url("../pages/home/assets/search.png") 8px 5px no-repeat;
    background-size: 20px;
    vertical-align: middle !important;
  }
  .search-query:focus {
    border-color: rgba(5, 161, 206, 0.99);
  }


  .labelStyle{
    height:50px
  }

  .el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 300px;
    min-height: 400px;
  }


</style>
